package com.zhangtai.modules.vo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zhangtai.config.LongJsonDeserializer;
import com.zhangtai.config.LongJsonSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

@Data
public class UserRoleVo {
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long id;

    @NotNull(message = "id不能为空")
    @ApiModelProperty(value="用户id",required = false)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long userId;

//    @NotNull(message = "角色id集合不能为空")
    @ApiModelProperty(value="角色id集合",required = false)
    private ArrayList<Long> roleIds;
}
